package com.ocom.websocket.feign;

import com.ocom.common.constant.PayConfigUrl;
import com.ocom.common.request.payconfig.*;
import com.ocom.common.request.web.*;
import com.ocom.common.resp.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(value = "payconfig")
public  interface PayConfigClientService {

    //2.1.获取餐段名称信息(getMealNameInfo)
    @GetMapping(PayConfigUrl.URLP_PayConfig_GetMealNameInfo)
    Result GetMealNameInfo(@RequestParam("comId") Long comId);

    //2.2.获取餐段时间信息(getMealTimeInfo)
//    @GetMapping(PayConfigUrl.URLP_PayConfig_GetMealTimeInfo)
//    Result GetMealTimeInfo(@RequestParam("comId") Long comId,@RequestParam("mealNo") String mealNo,
//                                  @RequestParam("page") Integer page,@RequestParam("size") Integer size);

     //2.3.添加餐段名称信息(addMealNameInfo)
    @PostMapping(PayConfigUrl.URLP_PayConfig_AddMealNameInfo)
    Result AddMealNameInfo(@RequestBody Map<String, Object> map);

    // 2.5.修改餐段名称信息(updateMealNameInfo)
    @PostMapping(PayConfigUrl.URLP_PayConfig_UpdateMealNameInfo)
    Result UpdateMealNameInfo(@RequestBody Map<String, Object> map);

    //2.4.添加餐段时间信息(addMealTimeInfo)
//    @PostMapping(PayConfigUrl.URLP_PayConfig_AddMealTimeInfo)
//    Result AddMealTimeInfo(@RequestBody @Validated EntityXfMealTime entityXfMealTime);

    // 2.6.修改餐段时间信息(updateMealTimeInfo)
//    @PostMapping(PayConfigUrl.URLP_PayConfig_UpdateMealTimeInfo)
//    Result UpdateMealTimeInfo(@RequestBody @Validated EntityXfMealTime entityXfMealTime);

    // 2.7.获取商户信息(getMerchInfo)
    @GetMapping(PayConfigUrl.URLP_PayConfig_GetMerchInfo)
    Result GetMerchInfo(@RequestParam("comId") Long comId,@RequestParam("merchName") String merchName,
                               @RequestParam("page")  Integer page,@RequestParam("size") Integer size);



    /**
     * 2.8.删除餐段时间信息(deleteMealTimeInfo)
     * */
    @PostMapping(PayConfigUrl.URLP_PayConfig_DeleteMealTimeInfo)
    Result DeleteMealTimeInfo(@RequestBody Map<String,Object> map);

    /**
     * 2.7.删除餐段名称信息(deleteMealNameInfo)
     * */
    @PostMapping(PayConfigUrl.URLP_PayConfig_DeleteMealNameInfo)
    Result DeleteMealNameInfo(@RequestBody Map<String,Object> map);


    // 消费2.11 .获取收费点信息(getTollPointInfo)
    @PostMapping(PayConfigUrl.Url_getTollPointInfo)
    Result getTollPointInfo(@RequestBody GetTollPointInfoRequest request);

    // 2.12.添加收费点信息(addTollPointInfo)
    @PostMapping(PayConfigUrl.Url_addTollPointInfo)
    Result addTollPointInfo(@RequestBody AddTollPointInfoRequest request);

    // 2.13.修改收费点信息(addTollPointInfo)
    @PostMapping(PayConfigUrl.Url_updateTollPointInfo)
    Result updateTollPointInfo(@RequestBody UpdateTollPointInfoRequest request);

    // 2.14.获取消费设备信息(getConsDeviceInfo)
    @PostMapping(PayConfigUrl.Url_getConsDeviceInfo)
    Result getConsDeviceInfo(@RequestBody GetConsDeviceInfoRequest request);

    // 2.14.获取消费设备列表(getConsDeviceList)
    @PostMapping(PayConfigUrl.Url_getConsDeviceList)
    Result GetConsDeviceList(@RequestBody Map<String,Object> map);

    //2.15.添加消费设备信息(addConsDeviceInfo)
    @PostMapping(PayConfigUrl.Url_addConsDeviceInfo)
    Result addConsDeviceInfo(@RequestBody AddConsDeviceInfoRequest request);

    //2.16.修改消费设备信息(updateConsDeviceInfo)
    @PostMapping(PayConfigUrl.Url_updateConsDeviceInfo)
    Result updateConsDeviceInfo(@RequestBody UpdateConsDeviceInfoRequest request);


    //2.17.删除消费设备信息(deleteConsDeviceInfo)
    @PostMapping(PayConfigUrl.Url_deleteConsDeviceInfo)
    Result deleteConsDeviceInfo(@RequestBody DeleteConsDeviceInfoRequest request);


    //2.18.获取消费设备升级版本(getXfOsVerInfo)
    @PostMapping(PayConfigUrl.Url_getXfOsVerInfo)
    Result getXfOsVerInfo(@Validated  @RequestBody GetXfOsVerInfoRequest request);

    //2.19.获取消费通道配置信息（getConfigureInfo）
    @PostMapping(PayConfigUrl.Url_getConfigureInfo)
    Result getConfigureInfo(@RequestBody GetConfigureInfoRequest request);

    //获取一条详情
    @PostMapping(PayConfigUrl.Url_ConfigureInfo)
    Result configureInfo(@RequestBody OneConfigureInfoRequest request);

    @PostMapping(PayConfigUrl.Url_addConfigureInfo)
    Result addConfigureInfo(@RequestBody AddConfigureInfoRequest request);

    //2.21.修改消费通道配置信息（updateConfigureInfo）
    @PostMapping(PayConfigUrl.Url_updateConfigureInfo)
    Result updateConfigureInfo(@RequestBody UpdateConfigureInfoRequest request);


    //2.22.删除消费通道配置信息（deleteConfigureInfo）
    @PostMapping(PayConfigUrl.Url_deleteConfigureInfo)
    Result deleteConfigureInfo(@RequestBody DeleteConfigureInfoRequest request);

    //消费渠道参数列表
    @PostMapping(PayConfigUrl.URLP_getPageChannel)
    Result getPageChannel(@RequestBody GetPayChannelRequest request);

    //添加消费渠道参数
    @PostMapping(PayConfigUrl.URLP_addPageChannel)
    Result addPageChannel(@RequestBody SavePayChannelRequest request);

    //更新消费渠道
    @PostMapping(PayConfigUrl.URLP_editPageChannel)
    Result editPageChannel(@RequestBody EditPayChannelRequest request);

    //删除消费渠道
    @PostMapping(PayConfigUrl.URLP_delPageChannel)
    Result delPageChannel(@RequestBody DelPayChannelRequest request);


    @PostMapping(PayConfigUrl.Url_deleteTollPointInfo)
    Result deleteTollPointInfo(@RequestBody DelTollPointRequest request);


    @PostMapping(PayConfigUrl.Url_getDeleteConfigureInfo)
    Result  getDeleteConfigureInfo(@RequestParam("companyId") Long companyId,@RequestParam("id") Integer id);

    //获取一条单位信息
    @PostMapping(PayConfigUrl.URLP_PayConfig_MerchPageInfo)
    Result MerchPageInfo(@RequestParam("companyId")Long companyId,@RequestParam("merchId") Integer merchId);
}
